<template>
  <div class="amap-select">
    <el-button type="primary" @click="openSelectAMap">打开选址</el-button>
    <!-- 组件 -->
    <AMapSelect ref="aMapSelect" @get-address="getAddress" />
  </div>
</template>

<script>
import AMapSelect from "@/components/BaseAmapSelect"

export default {
  name: "aMapSelect",
  components: {
    AMapSelect
  },
  methods: {
    openSelectAMap() {
      this.$refs.aMapSelect.init();
    },
    getAddress(data) {
      console.log(data);
    }
  }
};
</script>
